package cn.echisan.homework.utils;

import cn.echisan.homework.enums.Role;

/**
 * Created by echisan on 2018/6/4
 */
public class CommonUtils {

    public String roleName(String role){
        if (role.equals(Role.ROLE_STUDENT.name())){
            return "学生";
        } else if (role.equals(Role.ROLE_TEACHER.name())){
            return "教师";
        } else if (role.equals(Role.ROLE_ADMIN.name())){
            return "管理员";
        }
        return "未知用户";
    }
}
